<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="description" content="">
  <title>地图地址转换</title>
</head>
<body>
<div><textarea id="contentWrap" style="width: 100%;height:80px;"></textarea></div>
<p>
  <button onclick="decode();">转换</button>
  <a id="btnDownload" href="" download="" target="_blank" style="display:none">下载</a>
</p>
<script>
  function decode() {
    var textDom = document.getElementById('contentWrap');
    var btn = document.getElementById('btnDownload');
    btn.style.display = 'inline';
    var url = unescape(unescape(textDom.value));
    btn.href = 'http://www.hzplanning.gov.cn' + url.substr(url.indexOf('image=') + 6);
  }

</script>
</body>
</html>
